package com.yunxin.core.infra.persistence.mapper.channel;

import com.baomidou.dynamic.datasource.annotation.DS;
import com.yunxin.core.infra.persistence.entity.channel.ChannelPromotionUnitPriceConfigDO;
import com.yunxin.core.infra.persistence.entity.channel.query.result.ChannelPromotionChargedInfoResult;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Set;

/**
 * @author zero°
 * @since 2023-05-25
 */
@DS("core")
@Mapper
public interface ChannelPromotionUnitPriceConfigExtendMapper extends ChannelPromotionUnitPriceConfigMapper {

    /**
     * 根据渠道推广id查询渠道推广单价配置
     * @param promotionId promotionId
     * @return ChannelPromotionLinkConfig
     */
    ChannelPromotionUnitPriceConfigDO selectByPromotionId(@Param("promotionId") Long promotionId);

    /**
     * 根据渠道推广codes查询渠道推广单价配置
     * @param promotionCodes promotionCodes
     * @return ChannelPromotionLinkConfig
     */
    List<ChannelPromotionChargedInfoResult> listByPromotionCodes(@Param("promotionCodes")Set<String> promotionCodes);
}
